package com.wyz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wyz.dto.StudentClassDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wk
 * @desc
 * @date 2024/12/24 17:42
 */
@Mapper
public interface StudentClassMapper extends BaseMapper<StudentClassDTO> {
    @Select("SELECT s.student_name,c.class_id,c.class_name,c.class_teacher\n" +
            "FROM t_student s\n" +
            "CROSS JOIN t_class c ON s.student_class = c.class_name where student_class=#{className}; ")
    List<StudentClassDTO> queryStudentAndClassName(String className);
}
